package cn.ricecode.springdatamongo.entity;

/**
 * @author LiuZhulan
 */

import lombok.Builder;
import lombok.Getter;
import lombok.Setter;
import org.bson.types.ObjectId;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

@Getter
@Setter
@Builder
public class User {

    /**
     * MongoDB在不特殊指认的情况下，默认的集合主键是“_id”，类型是ObjectId
     */
    @Id
    private String id;

    private String  username;
}
